<div class="row">
	<div class="col-md-12"><h1 class="page-header"><small>カート商品詳細</small></h1></div>
</div>
<form method="post" action="<?=site_url('cart/update')?>">
<table class="table table-bordered">
<thead>
<tr>
    <th>取消</th>
    <th style="text-align:center" width="10%"></th>
    <th style="text-align:center" width="30%">商品名</th>
    <th style="text-align:center" width="20%">単価</th>
    <th style="text-align:center" width="20%">数量</th>
    <th style="text-align:center" width="20%">合計</th>
</tr>
</thead>
<tbody>
<?php if (isset($data['cart_item'])) {?>
<?php $i=1;?>
<?php foreach($data['cart_item'] as $items): ?>
<input type="hidden" name="rowid[]" value="<?php echo $items['rowid'];?>" />
<tr>
  <td><input type="checkbox" name="del[]" value="<?php echo $i - 1;?>" /></td>
  <td><img class="img-responsive" src="<?php echo IMG_DIR?>/<?php echo $items['sku_code'] .COMMON_IMG_EXT ; ?>" alt="" width="90" height="60" onerror="this.src='<?php echo NO_IMG?>';" ></td>
  <td><?php echo $items['commodity_name']; ?></td>
  <td style="text-align:right"><?php echo number_format($items['unit_price']); ?>円</td>
  <td style="text-align:center">
    <input type="text" name="qty[]" value="<?php echo $items['qty']?>" maxlength="3" size="5" style="text-align:right"/>
  </td>
  <td style="text-align:right"><?php echo number_format($items['sub_total']); ?>円</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
<?php } ?>
<td colspan="4" align="center">合計</td>
<td style="text-align:right"><?php echo number_format($data['total_count']) ?>個</td>
<td style="text-align:right"><?php echo number_format($data['total_price']) ?>円</td>
</tbody>
<tfoot>
<tr>
    <td colspan="6" style="text-align: center">
        <input type="button" onclick="location.href='<?=site_url('cart/destroy')?>'" value="カートを空にする" />
        <input type="submit" value="修正" />
    </td>
</tr>
</tfoot>
</table>
</form>
<!-- 
<div class="row">
	<div class="col-md-12"><h1 class="page-header"><small>お届け先情報</small></h1></div>
</div>
<div align="center">

<p>
  <button type="button" class="btn btn-primary btn-lg">ログインする</button>
  <button type="button" class="btn btn-primary btn-lg" onclick="location.href='<?=site_url('/customer/guest/?return_url=cart')?>'">ゲスト購入</button>
  <button class="btn btn-primary btn-lg" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">ゲスト購入</button>
  <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">ゲスト購入</button>
</p>
 -->
</div>
<br />


  
<form class="form-horizontal" role="form" name="payment" action="/zswebshop/index.php/payment" method="post">
<div class="collapse" id="collapseExample">
  <div class="well">
  <!-- email -->
	<div class="form-group">
		<label for="email" class="col-sm-2 control-label">EMAIL</label>
		<div class="col-sm-6">
				<input type="email" class="form-control" id="email" name="email" value="" placeholder="EMAIL" required>
		</div>
	</div>

	<!-- first_name -->
	<div class="form-group ">
		<label for="first_name" class="col-sm-2 control-label">性</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="first_name" name="first_name" value="" placeholder="性" required>
		</div>
	</div>

	<!-- last_name -->
	<div class="form-group">
		<label for="last_name" class="col-sm-2 control-label">名</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="last_name" name="last_name" value="" placeholder="名" required>
		</div>
	</div>

	<!-- first_name_kana -->
	<div class="form-group">
		<label for="first_name_kana" class="col-sm-2 control-label">性（カナ）</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="first_name_kana" name="first_name_kana" value="" placeholder="性（カナ）" required>
		</div>
	</div>

	<!-- last_name_kana -->
	<div class="form-group">
		<label for="last_name_kana" class="col-sm-2 control-label">名（カナ）</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="last_name_kana" name="last_name_kana" value="" placeholder="名（カナ）" required>
		</div>
	</div>
	
  </div>
</div>
</form>
<br/>
<?php if (isset($data['cart_item'])) {?>
<form class="form-horizontal" role="form" name="payment/init" action="/zswebshop/index.php/payment" method="post">
<div align="center"><button type="submit" class="btn btn-primary btn-lg" >支払い方法選択画面へ</button></div>
</form>
<?php }?>


<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">配送情報を入力してください。</h4>
      </div>
      <div class="modal-body">
<form class="form-horizontal" role="form" name="" action="" method="post">

  <!-- email -->
	<div class="form-group">
		<label for="email" class="col-sm-2 control-label">EMAIL</label>
		<div class="col-sm-6">
				<input type="email" class="form-control" id="email" name="email" value="" placeholder="EMAIL">
		</div>
	</div>

	<!-- first_name -->
	<div class="form-group">
		<label for="first_name" class="col-sm-2 control-label">性</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="first_name" name="first_name" value="" placeholder="性">
		</div>
	</div>

	<!-- last_name -->
	<div class="form-group">
		<label for="last_name" class="col-sm-2 control-label">名</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="last_name" name="last_name" value="" placeholder="名">
		</div>
	</div>

	<!-- first_name_kana -->
	<div class="form-group">
		<label for="first_name_kana" class="col-sm-2 control-label">性（カナ）</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="first_name_kana" name="first_name_kana" value="" placeholder="性（カナ）">
		</div>
	</div>

	<!-- last_name_kana -->
	<div class="form-group">
		<label for="last_name_kana" class="col-sm-2 control-label">名（カナ）</label>
		<div class="col-sm-4">
			<input type="text" class="form-control" id="last_name_kana" name="last_name_kana" value="" placeholder="名（カナ）">
		</div>
	</div>
</form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>


<!-- 
<pre>
<?php var_dump($data);?>
</pre>
 -->